package org.jeecg.modules.zcgl.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zcgl.entity.LeaseContractInfo;
import org.jeecg.modules.zcgl.vo.LeaseContractInfoPage;
import org.jeecg.modules.zcgl.vo.LeaseContractRenewVo;
import org.jeecg.modules.zcgl.vo.statistical.ContractParameterVo;
import org.jeecg.modules.zcgl.vo.statistical.DepositStatisticalVo;
import org.jeecg.modules.zcgl.vo.statistical.sum.ContractParameterSumVo;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 合同信息
 * @Author: jeecg-boot
 * @Date:   2020-06-20
 * @Version: V1.0
 */
public interface ILeaseContractInfoService extends IService<LeaseContractInfo> {

    void takeEffect(LeaseContractInfoPage page);

    void updateStatus(LeaseContractRenewVo vo);

    void updateStatusCheck(LeaseContractRenewVo vo);

    /**
     * 根据实体查询是否有数据
     * @param queryWrapper
     * @return
     */
    boolean isHasByTo(LambdaQueryWrapper<LeaseContractInfo> queryWrapper);

    /**
     * 添加一对多
     *
     */
    public void saveMain(LeaseContractInfoPage leaseContractInfoPage) ;

    /**
     * 修改一对多
     *
     */
    public void updateMain(LeaseContractInfoPage leaseContractInfoPage);

    /**
     * 删除一对多
     */
    public void delMain (String id);

    /**
     * 批量删除一对多
     */
    public void delBatchMain (Collection<? extends Serializable> idList);

    /**
     * 自动生成账单
     * @param leaseContractInfo
     */
    void autoGenerateReceivables(LeaseContractInfo leaseContractInfo);

    void modify(LeaseContractInfoPage leaseContractInfoPage);

    /**
     * 数据校验
     * @param entity
     * @return
     */
    void checkModel(LeaseContractInfoPage entity);

    /**
     * 合同信息变更验证数据
     * @param leaseContractInfoPage
     */
    void modifyCheckModel(LeaseContractInfoPage leaseContractInfoPage);

    void renewCheckModel(LeaseContractRenewVo vo);

    void renew(LeaseContractRenewVo vo);

    /**
     * 导入保存数据
     * @param vo
     */
    void importSaveMain(LeaseContractInfoPage vo);

    /**
     * 合同报表
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<ContractParameterVo>  queryContractParameterVoList(Page<ContractParameterVo> page, QueryWrapper<ContractParameterVo> queryWrapper);

    List<ContractParameterVo> queryContractParameterVoList(QueryWrapper<ContractParameterVo> queryWrapper);


    IPage<DepositStatisticalVo> queryDepositStatisticalVoList(Page<DepositStatisticalVo> page,QueryWrapper<DepositStatisticalVo> queryWrapper);

    List<DepositStatisticalVo> queryDepositStatisticalVoList(QueryWrapper<DepositStatisticalVo> queryWrapper);

    /**
     * 查询合计
     * @param queryWrapper
     * @return
     */
    ContractParameterSumVo getContractParameterSum(QueryWrapper<ContractParameterVo> queryWrapper);
}
